#ifndef MULTIPAGESHEETWIDGET_H
#define MULTIPAGESHEETWIDGET_H

#include <QWidget>
#include <QVariantMap>

#include "interfaces.h"

namespace Ui {
    class MultiPageSheetWidget;
}

class QIODevice;

class MultiPageSheetWidget : public WidgetWithGdrData
{
    Q_OBJECT

public:
    explicit MultiPageSheetWidget(QWidget *parent = 0);
    ~MultiPageSheetWidget();

    void setGdrData(QVariantMap *data);
    QObject * chModel();


    bool saveTo(QString file);
    bool saveTo(QIODevice* io);

    bool loadFrom(QString file);
    bool loadFrom(QIODevice* io);

    void updateData(QObject* model);

private slots:
    void nextPage();
    void prevPage();

signals:
    void incompatibleDataVersion(QString, QString);
    void incompatibleDataLocale(QString, QString);

private:
    Ui::MultiPageSheetWidget *ui;    
    QVariantMap* gdrData;
    QObject* ch;
};

#endif // MULTIPAGESHEETWIDGET_H
